<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"> 
  <body class="nav-md">
	<div class="page-title">
	  <div class="title_left">
	    <h3>消息管理</h3>
	  </div>
	  <div class="title_right">
	  	<div class="pull-right">
	  		<a onclick="goAddMessage()" class="btn btn-app">
	  			<i class="fa fa-file"></i>新增
	  		</a>
	  	</div>
	  </div>
	</div>
        
    <div class="clearfix"></div>
    
    <div class="row">
       <div class="col-md-12 col-sm-12 col-xs-12">
         <div class="x_panel">
           <div class="x_title">
             <h2>消息列表</h2>
             <div class="clearfix"></div>
           </div>
           <div class="x_content">
             <table id="datatable" class="table table-striped table-bordered">
               <thead>
                    <tr>
                      <th>标题</th>
                      <th>内容</th>
                      <th>创建时间</th>
                      <th>发送时间</th>
                      <th>发送状态</th>
                      <th>操作</th>
                    </tr>
               </thead>
               <tbody>
                    <tr th:each="message : ${messageList}">
                      <td th:text="${message.title}">Tiger Nixon</td>
                      <td th:text="${message.content}">System Architect</td>
                      <td th:text="${message.createdDateStr}">Edinburgh</td>
                      <td th:text="${message.sendDateStr}">61</td>
                      <td th:text="${message.statusStr}">2011/04/25</td>
                      <td>
	                      <a class="btn btn-info btn-xs" th:onclick="'javascript:goMessageDetail(\''+ ${message.id}+'\')'"><i class="fa fa-serach"></i>查看</a>
	                      <a th:if="${message.status} == 0 or ${message.status} == X" class="btn btn-primary btn-xs" th:onclick="'javascript:goEditMessage(\''+ ${message.id}+'\')'"><i class="fa fa-serach"></i>编辑</a>
                     	  <a th:if="${message.status} == 0" class="btn btn-warning btn-xs" th:onclick="'javascript:cancelMessage(\''+ ${message.id}+'\')'"><i class="fa fa-serach"></i>取消</a>
                      </td>
                    </tr>
                 </tbody>
             </table>
           </div>
         </div>
       </div>
	</div>
    <script src="../cms/js/message.js"></script>
  </body>
</html>